//
// Created by vista on 2017/12/8.
//

#ifndef P_P1_H
#define P_P1_H

#include <vector>
using namespace std;

class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {

        int size = (int)nums.size();
        vector<int> result ;

        for(int i = 0; i < size - 1; ++i){
            for (int j = i+1; j < size; ++j){
                if(nums[i]+nums[j] == target){
                    result.push_back(i);
                    result.push_back(j);
                    return result;
                }
            }
        }

        return result;
    }
};

#endif //P_P1_H
